{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#本章需导入的模块\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "plt.rcParams['font.sans-serif']=['SimHei']  #解决中文显示乱码问题\n",
    "plt.rcParams['axes.unicode_minus']=False\n",
    "import warnings\n",
    "warnings.filterwarnings(action = 'ignore')\n",
    "from sklearn.metrics import confusion_matrix,f1_score,roc_curve, auc, precision_recall_curve,accuracy_score\n",
    "from sklearn.model_selection import train_test_split,KFold,LeaveOneOut,LeavePOut # 数据集划分方法\n",
    "from sklearn.model_selection import cross_val_score,cross_validate # 计算交叉验证下的测试误差\n",
    "from sklearn import preprocessing\n",
    "import sklearn.linear_model as LM\n",
    "from sklearn import neighbors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.455, 1.01)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAETCAYAAAB6AgEhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdeZzN9ffA8dex7+sPhWRXFKNklwlF2UqI8NWqiFSS6tui6NuiVISaKBUqpZA9fe3ZxreRUKlItiLrjH3m/P5430HMPvfez5075/l4zONun3s/Z5SPc9/LOaKqGGOMMcYYb+TwOgBjjDHGmOzMkjFjjDHGGA9ZMmaMMcYY4yFLxowxxhhjPGTJmDHGGGOMhywZM1mGiBTyOgZjjMkIcQp6HYcJTZaMmZAmIr+KyBUikhM4IiJ5kzmusYg0POdxKxHp6Ltv/58bYzwhIqd9XySr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ZtvvplixYrRqVOnoISWkJDAF198QcOGDYmMjGTNmjU888wz/P7770yePNkSMRMQlowZE0yzZ0PTprB2Lezc6XU0xnijWDH3d6FvXxgxwn05iT3bonj69OnUqlWLL774gmHDhrFu3Trq1q0b0JBOnjzJhAkTuPzyy7n11lvZt28fY8eO5ffff2fo0KFcfPHFATlvQhKJqMl+LBlLg8Rir1bo1WTK6NFuaqZGDVi9GqpV8zoiY7yTO7crajxqFHz1FXz+OQcOHKBXr17ccsstlC1blujoaJ566ily586d6sctX76ciRMnpjuMU6dO8e6771KtWjXuueceChUqxKeffsrPP/9M3759yZ8/fwZ+uZSpKosWLaJ79+4UKFCADz/80O/nMFmLJWNpkFjs1Qq9mgx7+WXXY7JdO9sxaUwiEbduMiaGr8uWpVatWkz/+GOeffZZVq9eTe3atVP9iF27dtGzZ0+aNWvGnXfeyfHjx9N06tOnT/P+++9To0YN+vTpw8UXX8y8efOIjo6ma9eu5AxAiZm9e/fy6quvUqNGDVq0aMHcuXM5ceIEv//+u9/PZbIWS8bSKLHYqxV6NRly663w73/DF1/YjkljzhEfH8/QadNo3aYN9QoUYH+xYgy94gry5MmT4vsSEhIYM2YMl112GZ999tmZxC213ZYJCQlMmjSJyy67jLvuuouSJUsyZ84cVq5cSevWrRERv/1uifEsWrSIbt26Ua5cOQYPHkzp0qX58MMP2bFjh1/PZbIuS8aMCZSdO+G551wbmKpVYfhwK+hqzDn27t1LmzZteO655+jVqxcff/01uWvUgC5d4IUXkm2htHnzZpo1a0b//v1p2LAhGzduTNOsxaJFi7jmmmvo1asXhQsXZubMmaxZs4Ybb7zR70lYbGwsb731FpdddhktWrRgwYIF9OvXjx9++IHly5fTq1evgEyBpkd8fDxr1qyxQrUhwJIxYwIhJgYaNIBXX4UtW7yOxpiQs2LFCurWrcuyZct49913mThxIgUrVYJvvoGePeGpp+Bf/4ITJ/7xvuHDhxMREcGPP/7IBx98wPz586latWqK59q8eTPt27enRYsW7Nu3j0mTJrFu3Trat2/v9yRs69atDB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u4HUxI0mjZrtAW4E5pTW+QQfARiUfAV+MzOzHkhay3sPFw6JiObS8yKtO7i3y8jYENL/sfskzSONinWcjDSFNEl/S+n+cNKZmGeQmrVXgHXANB8BGBw8MmZmZtaD0iV2DvV8AHu7eXx/p9v30emSF5K+BWyNiEc6f09pRM1HAAYhj4yZmZl1Iekk0pyuXd09TZqE/23SJH6AIM31GgW8RhrtGhYRZ3ez7+uALZ1PUrLBzc2YmZlZFUh6X0S8nXUcln9uxszMzMwy5OWQzMzMzDLkZszMzMwsQ27GzMzMzDLkZszMzMwsQ/8HHHcK6op9dggAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = pd.read_csv('类别和概率.csv')\n",
    "label=data['label']\n",
    "prob=data['prob']\n",
    "pos = np.sum(label == 1)\n",
    "neg = np.sum(label == 0)\n",
    "prob_sort = np.sort(prob)[::-1]\n",
    "index = np.argsort(prob)[::-1]\n",
    "label_sort = label[index]\n",
    "\n",
    "Pre = []\n",
    "Rec = []\n",
    "tpr=[]\n",
    "fpr=[]\n",
    "for i, item in enumerate(prob_sort):\n",
    "    Rec.append(np.sum((label_sort[:(i+1)] == 1)) /pos)\n",
    "    Pre.append(np.sum((label_sort[:(i+1)] == 1))/(i+1))\n",
    "    tpr.append(np.sum((label_sort[:(i+1)] == 1))/pos)\n",
    "    fpr.append(np.sum((label_sort[:(i+1)] == 0)) /neg)\n",
    "\n",
    "fig,axes=plt.subplots(nrows=1,ncols=2,figsize=(10,4))\n",
    "axes[0].plot(fpr,tpr,'k')\n",
    "axes[0].set_title('ROC曲线')\n",
    "axes[0].set_xlabel('FPR')\n",
    "axes[0].set_ylabel('TPR')\n",
    "axes[0].plot([0, 1], [0, 1], 'r--')\n",
    "axes[0].set_xlim([-0.01, 1.01])\n",
    "axes[0].set_ylim([-0.01, 1.01])\n",
    "axes[1].plot(Rec,Pre,'k')\n",
    "axes[1].set_title('P-R曲线')\n",
    "axes[1].set_xlabel('查全率R')\n",
    "axes[1].set_ylabel('查准率P')\n",
    "axes[1].plot([0,1],[1,pos/(pos+neg)], 'r--')\n",
    "axes[1].set_xlim([-0.01, 1.01])\n",
    "axes[1].set_ylim([pos/(pos+neg)-0.01, 1.01])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "说明：\n",
    "1、这里给出绘制ROC曲线和P-R曲线的示例。数据来自名为“类别和概率.csv”的文本文件，包括两列数据。第1列为模型预测为1类的概率值，第2列为实际标签（0或1）。\n",
    "2、首先，计算实际标签为1和0类的样本量(pos和neg)；然后，将数据按概率值降序重新排列。\n",
    "3、利用for循环计算绘图所需数据，FPR,TPR,查全率R和查准率P。循环中的i为索引，item为prob_sort的具体值（预测概率）。item值的重要应用是确定合理的概率阈值，应为TPR/FPR最大处的item值。这里采用enumerate() 函数，用于给出一个可遍历数据对象(如列表等）的索引和对应的数据。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
